<?php


namespace App\Http\Requests\Partitions;
use Illuminate\Foundation\Http\FormRequest;

class ListRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'store_id' => 'required|integer',
            'partitions_id' => 'integer|gte:0',
            'state' => 'integer|in:0,1,2',
        ];
    }

    public function messages()
    {
        return [
            'store_id' => '门店ID~',
            'partitions_id' => '区域ID',
            'state' => '桌台状态',
        ];
    }
}